@php
    $routeCA = explode('@',class_basename(app('request')->route()->getAction()['controller']));
    $controller = $routeCA[0];
    $action_name = $routeCA[1];
@endphp
<div id="sidebar">

    <div class="sidebar-nav">

        <ul class="menunav">
            <li  class="{{ $controller == 'ReserveController' && in_array($action_name, ['index', 'edit', 'xd']) ? 'active' : '' }}">
                <a href="{{route('home')}}">
                    <i class="iconfont icon-jiudianyuding"></i>
                    <span>预订</span>
                </a>
            </li>
            <li class="{{ $controller == 'ReserveController' && in_array($action_name, ['list']) ? 'active' : '' }}">
                <a href="{{route('reserve.list')}}">
                    <i class="iconfont icon-clock"></i>
                    <span>我的预订</span>
                </a>

            </li>
        </ul>

    </div>

</div>